Skip to content

Document ensure-line contract imports - #408

Merged
myobie merged 1 commit into
mainfrom
agent/ensure-line-contract-files
Sep 1, 2026
Merged

Document ensure-line contract imports#408
myobie merged 1 commit into
mainfrom
agent/ensure-line-contract-files

Conversation

@myobie

@myobie myobie commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Document the existing ensure-line render verb for native contract imports.
  • Specify verify-only behavior for Git-tracked CLAUDE.md and AGENTS.md files.
  • Add acceptance tests for creation, prose preservation, idempotence, and tracked-file refusal.

Tracked-file decision

st2 never changes a Git-tracked target. It accepts an existing exact line and boot-gates when the line is absent. The repository owner makes and commits the one-time edit.

This rule prevents an autonomous render from dirtying a customer repository. It also works with repositories where assistants have read-only Git access.

Import provenance

Nathan stated on 2026-09-01 that Codex supports @ imports in AGENTS.md. The behavior is undocumented and was not verified against Codex source for this change.

Tests

  • cargo test --test materialize — 29 passed
  • cargo test --test materialize ensure_line — 3 passed

The requested verb already existed on main. This pull request adds the missing contract documentation and direct acceptance coverage.

@myobie
myobie merged commit ebe4770 into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant